/**
 * 
 */
package com.moioo.exam.action;

import org.apache.struts.action.ActionForm;
import org.apache.struts.upload.FormFile;

/**
 * @author 3400423@qq.com
 *
 */
public class FileBean extends ActionForm{
	private static final long serialVersionUID = 6531553164831950738L;
	protected FormFile xlsFile;
	public FormFile getXlsFile() {
		return xlsFile;
	}
	public void setXlsFile(FormFile xlsFile) {
		this.xlsFile = xlsFile;
	}
	public String getFileEtx(){
		if(xlsFile != null){
			return xlsFile.getFileName().substring(xlsFile.getFileName().lastIndexOf(".")+1,xlsFile.getFileName().length()).toUpperCase();
		}
		return null;
	}
	public boolean check(){
		if("XLS".equals(getFileEtx())){
			return true;
		}
		return false;
	}
}
